package com.ruike.alisurface.http;

import com.ruike.alisurface.utils.ShareKey;
import com.voodoo.lib_frame.base.BaseView;
import com.voodoo.lib_frame.httpTools.ApiTools;
import com.voodoo.lib_frame.httpTools.RequestParams;
import com.voodoo.lib_utils.ShareUtils;

public class OtherApiHttps {

    /**
     * 直接随机出货
     */
    public static final String START_OUT_URL = "https://rk.shouhuojiyun.com/otherApi/guizhou_leda/start_out";
    /**
     * 上报出货情况
     */
    public static final String END_ORDER_URL = "https://rk.shouhuojiyun.com/otherApi/guizhou_leda/end_order";

    /**
     * 扫码后直接随机出货
     */
    public static void startOut(String couponCode, BaseView apiListener) {
        RequestParams params = new RequestParams();
        params.put("mch_id", ShareUtils.getInstance().getString(ShareKey.MCH_ID));
        params.put("couponCode", couponCode);
        new ApiTools().getRequest(START_OUT_URL, params, apiListener);
    }

    /**
     * 订单结束
     */
    public static void endOrder(String orderId, boolean isEnd, String remark, BaseView apiListener) {
        RequestParams params = new RequestParams();
        params.put("order_id", orderId);
        params.put("IsEnd", isEnd);
        params.put("remark", remark);
        params.put("couponCode", ShareUtils.getInstance().getString(ShareKey.COUPON_CODE));
        params.put("mchId", ShareUtils.getInstance().getString(ShareKey.MCH_ID));
        new ApiTools().getRequest(END_ORDER_URL, params, apiListener);
    }

}
